package com.jerry.waimai.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jerry.waimai.dto.DishDto;
import com.jerry.waimai.entity.Dish;

import java.util.List;

public interface DishService extends IService<Dish> {
    //新增菜品，同时插入菜品对应的口味数据，需要操作两张表：dish、dish_flavor
    public void saveWithFlavor(DishDto dishDto);

    //根据id多表联查
    public DishDto getByIdWithFlavor(Long id);

    //更新菜品信息，同时更新口味信息
    public void updateWithFlavor(DishDto dishDto);

    void removeFlavorById(List<Long> ids);

}
